from pydantic import BaseModel, Field
from enum import Enum
from typing import Optional

from pyJianYingDraft import Export_resolution, Export_framerate


class DurationRequest(BaseModel):
    url: str = Field(..., description="视频或音频链接")

class RenderTaskRequest(BaseModel):
    draft_id: str = Field(description="草稿ID")
    resolution: Optional[Export_resolution] = Export_resolution.RES_1080P
    framerate: Optional[Export_framerate] = Export_framerate.FR_30

class RenderTaskListRequest(BaseModel):
    draft_id: str = Field(description="草稿ID")

class RenderTaskStatusRequest(BaseModel):
    task_id: str = Field(description="任务ID")